package com.yand.oratransmysql.constant;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * oracle转化mysql 常量
 */
@Component
public class Constant {


    //文件路径
    public static String filePath;

    //核心线程数
    public static Integer coreThreadNum;

    //类型
    public static Integer type;

    //阻塞队列长度
    public static Integer blockqueueLenth;

    //分页个数
    public static Integer pageSize;


    @Value("${convert.constant.filePath}")
    public void setFilePath(String filePath) {
        Constant.filePath = filePath;
    }

    @Value("${convert.constant.coreThreadNum}")
    public void setCoreThreadNum(String coreThreadNum) {
        Constant.coreThreadNum = Integer.parseInt(coreThreadNum);
    }

    @Value("${convert.constant.type}")
    public void setType(String type) {
        Constant.type = Integer.parseInt(type);
    }

    @Value("${convert.constant.blockqueueLenth}")
    public void setBlockqueueLenth(String blockqueueLenth) {
        Constant.blockqueueLenth = Integer.parseInt(blockqueueLenth);
    }

    @Value("${convert.constant.pageSize}")
    public void setPageSize(String pageSize) {
        Constant.pageSize = Integer.parseInt(pageSize);
    }
}
